<script setup lang="ts">
import { ref, onMounted } from 'vue'
import AppPages from './components/AppPages.vue'
import { getWorkflowParamsAPI } from '@/services/app'

const title = '二次元风'
const description = '使用AI技术，将您的照片转换成精美的动漫风格'
const workflowId = 'convert_to_anime_workflow'
const placeholderImage = '/static/images/home/convertoAnime.png'
const workflowParams = ref({})

const getWorkflowParams = async () => {
  const res = await getWorkflowParamsAPI(workflowId)
  workflowParams.value = res.result
}

onMounted(() => {
  getWorkflowParams()
})
</script>

<template>
  <AppPages
    :title="title"
    :description="description"
    :workflow-params="workflowParams"
    :workflow-id="workflowId"
    :placeholder-image="placeholderImage"
    @generation-success="() => {}"
  />
</template>
